<?php

chdir('../');

require('includes/setUp.php');

if (isset($_GET["style"]) ) {
  try {
    
    if (!$LOGGED) { 
      throw new Exception(T_('You have to be logged on'));
    }  
    
    $style = Validations::validateString($_GET["style"], null, Validations::regexp_idStyle);
        
      $user->Style = $db->find('Style', $style);
      $db->flush();    
    
  } catch (Exception $ex) {
      globalFunc::redirect(WebRoot.'index.php?errMsg='.rawurlencode($ex->getMessage()));
    }
}

globalFunc::redirect();

?>
